home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / DirectX / dx9sdkcp.exe / SDK (C++) / Samples / Media / uielement.fx < prev    next >
Encoding:
Text File  |  2002-11-12  |  2.3 KB  |  80 lines

  1. //
  2. // UIElement.fx
  3. //
  4. // Note: This effect file works with EffectEdit.
  5. //
  6.  
  7. technique Unselected
  8. {
  9.     pass p0
  10.     {
  11.         // Set up reasonable material defaults
  12.         MaterialAmbient   = {1.0, 1.0, 1.0, 1.0}; 
  13.         MaterialDiffuse   = {1.0, 1.0, 1.0, 1.0}; 
  14.         MaterialSpecular  = {1.0, 1.0, 1.0, 1.0}; 
  15.         MaterialPower     = 40.0;
  16.         
  17.         // Set up one directional light
  18.         LightType[0]      = DIRECTIONAL;
  19.         LightAmbient[0]   = {0.2, 0.2, 0.2, 1.0};
  20.         LightDiffuse[0]   = {0.0, 0.0, 0.8, 1.0};
  21.         LightSpecular[0]  = {1.0, 1.0, 1.0, 1.0}; 
  22.         LightDirection[0] = {0.7, -0.7, 0.0 };
  23.         LightRange[0]     = 100000.0f;
  24.         
  25.         // Turn lighting on and use light 0
  26.         LightEnable[0] = True;
  27.         Lighting = True;
  28.         SpecularEnable = False;
  29.         FillMode = Solid;
  30.         
  31.         // Set up textures and texture stage states
  32.         ColorOp[0] = SelectArg2;
  33.         ColorArg1[0] = Texture;
  34.         ColorArg2[0] = Diffuse;
  35.         AlphaOp[0] = SelectArg2;
  36.         AlphaArg1[0] = Texture;
  37.         AlphaArg2[0] = Diffuse;
  38.  
  39.         ColorOp[1] = Disable;
  40.         AlphaOp[1] = Disable;
  41.     }
  42. }
  43.  
  44. technique Selected
  45. {
  46.     pass p0
  47.     {
  48.         // Set up reasonable material defaults
  49.         MaterialAmbient   = {1.0, 1.0, 1.0, 1.0}; 
  50.         MaterialDiffuse   = {1.0, 1.0, 1.0, 1.0}; 
  51.         MaterialSpecular  = {1.0, 1.0, 1.0, 1.0}; 
  52.         MaterialPower = 40.0;
  53.         
  54.         // Set up one directional light
  55.         LightType[0]      = DIRECTIONAL;
  56.         LightAmbient[0]   = {0.2, 0.2, 0.2, 1.0};
  57.         LightDiffuse[0]   = {0.6, 0.6, 1.0, 1.0};
  58.         LightSpecular[0]  = {1.0, 1.0, 1.0, 1.0}; 
  59.         LightDirection[0] = {0.7, -0.7, 0.0 };
  60.         LightRange[0]     = 100000.0f;
  61.         
  62.         // Turn lighting on and use light 0
  63.         LightEnable[0] = True;
  64.         Lighting = True;
  65.         SpecularEnable = False;
  66.         FillMode = Solid;
  67.         
  68.         // Set up textures and texture stage states
  69.         ColorOp[0] = SelectArg2;
  70.         ColorArg1[0] = Texture;
  71.         ColorArg2[0] = Diffuse;
  72.         AlphaOp[0] = SelectArg2;
  73.         AlphaArg1[0] = Texture;
  74.         AlphaArg2[0] = Diffuse;
  75.  
  76.         ColorOp[1] = Disable;
  77.         AlphaOp[1] = Disable;
  78.     }
  79. }
  80.